
<nz-layout>
  <nz-sider [nzWidth]="300">
    <div style="background-color: #fff;padding:5px;height: 100%;overflow: auto;">
      <nz-divider nzText='权力事项清单' nzOrientation="left" style="color:rgb(238, 85, 85);font-weight: bold;font-size: 13px;"></nz-divider>
      <nz-input-group [nzSuffix]="suffixIcon">
        <input type="text" nz-input placeholder="按事项名称筛选..." [(ngModel)]="searchValue" />
      </nz-input-group>
      <ng-template #suffixIcon>
        <i nz-icon nzType="search"></i>
      </ng-template>

      <div [ngStyle]="style">
      <nz-tree [nzSearchValue]="searchValue" [nzData]="nodes" nzShowLine nzExpandAll nzHideUnMatched (nzClick)="nzEvent($event)"> </nz-tree>
      </div>
    </div>
  </nz-sider>
  <nz-content>
    <div style="padding: 5px;background-color:#fff">
      <nz-divider nzText='权力事项详情' nzOrientation="left" style="color:rgb(238, 85, 85);font-weight: bold;font-size: 13px;"></nz-divider>
      <sf #showSf mode="edit" [schema]="showSchema" [button]="null">
        <div  style="text-align:right;padding-right:5px;">
         <!-- <button nz-button nzType="danger" [disabled]="isCopyDisabled" (click)="copy()"><i nz-icon nzType="copy"></i>子项表单提取</button>-->
        <button nz-button nzType="primary" [disabled]="isAddDisabled" (click)="add()"><i nz-icon nzType="plus"></i>添加材料</button>
      </div>
      </sf>
      <nz-divider nzText="事项材料列表" nzOrientation="left" style="color:rgb(238, 85, 85);font-weight: bold;font-size: 13px;overflow-x:auto"></nz-divider>
      <lb-grid #st  [columns]="columns" sname="CLWH_QUERY" [queryparas]="{DAD017: 0}" [scroll]="{x:'2000px'}">
      </lb-grid>
    </div>
  </nz-content>
</nz-layout>

<nz-modal [(nzVisible)]="isVisible" [nzTitle]="modalTitle" (nzOnCancel)="handleAddCancel()" (nzOnOk)="handleAddOk()" nzWidth="1200">
  <sf #addSf [schema]="addSchema" [button]="null" nzOkText="确定">
    <ng-template sf-template="custom" let-me let-ui="ui" let-schema="schema">
      <input
        nz-input
        [attr.id]="me.id"
        [disabled]="me.disabled"
        [attr.disabled]="me.disabled"
        [nzSize]="ui.size"
        [ngModel]="me.formProperty.value"
        (ngModelChange)="me.setValue($event)"
        (click)="CLAdd()"
        readonly
      />
    </ng-template>
  </sf>
</nz-modal>

<nz-modal [(nzVisible)]="isClVisible" [nzTitle]="modalClTitle" (nzOnCancel)="handleClCancel()" nzWidth="1000" >

  <div nz-row>
    <div nz-col nzSpan="18">
      <sf #sf mode="search" [schema]="searchSchema" button = "none"></sf>
    </div>
    
    <div  nz-col nzSpan="6" style="text-align:right;padding-top: 5px;">
      <button (click)="query()" nz-button nzType="primary"><i nz-icon nzType="search"></i>搜索</button>
    </div>
    
  </div>
   <lb-grid #clst [columns]="ClColumns" [sname]="param.sname" [queryparas]="param.queryparas"></lb-grid>
</nz-modal>

<nz-modal
      [(nzVisible)]="isUpVisible"
      nzTitle="修改事项材料"
      [nzFooter]="null"
      (nzOnCancel)="handleUpCancel()"
      nzWidth="1000"
    >
  <sf #upSf mode="edit" [schema]="upSchema" [button]="null" [formData]="upData"></sf>
  <div class="modal-footer">
    <button nz-button type="submit" [nzType]="'primary'" (click)="saveUp()" [disabled]="!upSf.valid">
    <i nz-icon nzType="save"></i>保存修改
    </button>
  </div>
</nz-modal>


    <nz-modal [(nzVisible)]="bqUpdateVisible" nzTitle="材料标签" (nzOnCancel)="handleBqCancel()" (nzOnOk)="handleBqOk()" nzWidth="500">
      <nz-tree
      [nzData]="bqNodes"
      nzCheckable
      nzMultiple
      [nzCheckedKeys]="defaultCheckedKeys"
    >
    </nz-tree>
   </nz-modal>